using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace LogParser.Collections
{
    public class ObjectList
    {

        private DA.ObjectListModel _model;
        Hashtable _objectList;

        public ObjectList()
        {
            Initialize();
        }

        private void Initialize()
        {
            _model = new LogParser.DA.ObjectListModel();
            _objectList = new Hashtable();

            List<GameObjects.Object> objectList = _model.GetObjectList();

            foreach ( GameObjects.Object tempObject in objectList )
            {
                _objectList.Add( tempObject.ShortName, tempObject );
            }

        }


        public GameObjects.Object GetObject( string objectName )
        {

            GameObjects.Object returnObject = new LogParser.GameObjects.Object();

            returnObject = (GameObjects.Object) ( _objectList[ objectName ] );

            return returnObject;

        }

    }
}
